<template>
  <div class="hello">
    <div>
      <div style="color: red;">计算属性：mapState获取值</div>
      <br />
      <p>{{ count }}</p>
      <p>{{ count1 }}</p>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'HelloWorld',
  props: {
    msg: String
  },
  methods: {},
  computed: mapState(['count', 'count1'])
}
</script>

<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
